package com.bruce;

public class ProductFactory {
    public static Product produce(String productName) {
        switch (productName) {
            case "tv":
                return new Tv();
            case "car":
                return new Car();
            default:
                System.out.println("没有该产品");
                return null;
        }
    }
}
